﻿<%@ Page Title="View Bookings" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ViewBookings.aspx.cs" Inherits="_344A.ViewBookings" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2 id="SetName" runat="server">
    </h2>
    <strong>Event Name:</strong> <span id="ename" runat="server"></span>
    <br />
    <strong>Event Hall:</strong> <span id="ehall" runat="server"></span>
    <br />
    <strong>Event Date:</strong> <span id="edate" runat="server"></span>
    <br />
    <strong>Event Duration:</strong> <span id="edur" runat="server"></span>
    <br />
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1" AllowPaging="True" 
            AllowSorting="True" onselectedindexchanged="GridView1_SelectedIndexChanged" 
            Width="920px" DataKeyNames="Confirmation Number" CellPadding="4" ForeColor="#333333" 
            GridLines="None">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="Confirmation Number" HeaderText="Confirmation Number" 
                    SortExpression="Confirmation Number" InsertVisible="False" 
                    ReadOnly="True" />
                <asp:BoundField DataField="Customer First Name" HeaderText="Customer First Name" 
                    SortExpression="Customer First Name" />
                <asp:BoundField DataField="Customer Last Name" HeaderText="Customer Last Name" 
                    SortExpression="Customer Last Name" />
                <asp:BoundField DataField="Ticket Number" HeaderText="Ticket Number" 
                    SortExpression="Ticket Number" />


            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:Database1ConnectionString %>" 
            
            
            
            
            SelectCommand="SELECT [confirmation] AS 'Confirmation Number',  [firstName] AS 'Customer First Name', [lastName] AS 'Customer Last Name', [seatNo] as 'Ticket Number' FROM [Booking] WHERE [eventId] = @EVENT_ID">
            <SelectParameters>
                <asp:QueryStringParameter Name="EVENT_ID" QueryStringField="id" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <a href="javascript:history.go(-1)"><< Back</a>
</asp:Content>